﻿using SharePoint.Security.ConfigAnalyzer.Engine;
using SharePoint.Security.ConfigAnalyzer.Engine.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharePoint.Security.ConfigAnalyzer.Client.Services
{
    internal interface IDataService
    {
        List<BaseRuleSet> GetRules();
    }

    internal class ActualDataService : IDataService
    {
        public List<BaseRuleSet> GetRules()
        {
            RuleEngine engine = new RuleEngine();
            var ruleSets = engine.GetRuleSets();
            foreach (var item in ruleSets)
            {
                item.SetUp(item.GetType().Namespace);
            }
            return ruleSets;
        }
    }
}
